# coding:utf-8

from django.db import models
import django.utils.timezone as timezone


class User(models.Model):
    # 学号(主键)
    user_id = models.CharField(max_length=64, primary_key=True)
    # 学生姓名
    user_name = models.CharField(max_length=512)
    # 密码
    user_password = models.CharField(max_length=512)
    # 班级
    user_class = models.CharField(max_length=512)


class UserLog(models.Model):
    # 日志ID(主键)
    log_id = models.AutoField(primary_key=True)
    # 学号
    user_id = models.CharField(max_length=64)
    # 日志时间
    log_time = models.DateTimeField(default=timezone.now)
    # 日志内容
    log_content = models.CharField(max_length=255)
